package com.xiashitech.agent.instrumentation.db.resultset.inst;

import com.google.auto.service.AutoService;
import com.xiashitech.agent.instrumentation.db.resultset.inst.XSResultSetInstrumentation;
import com.xiashitech.agent.instrumentation.db.resultset.inst.XSResultSetStatementInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;

import java.util.Arrays;
import java.util.List;

import static java.util.Arrays.asList;

@AutoService(InstrumentationModule.class)
public class XSResultSetInstrumentationModule extends InstrumentationModule {
    public XSResultSetInstrumentationModule() {
        super("XSJdbcResultSet");
    }
    @Override
    public List<TypeInstrumentation> typeInstrumentations() {
        return asList(new XSResultSetStatementInstrumentation(),new XSResultSetInstrumentation());
    }

    @Override
    public List<String> getAdditionalHelperClassNames() {
        return Arrays.asList("com.xiashitech.agent.instrumentation.helper.calldepth.XSResultSetStatementCallDepth",
                "com.xiashitech.agent.instrumentation.db.resultset.XSResultSetSingletons",
                "com.xiashitech.agent.instrumentation.db.resultset.XSResultSetAttributesExtractor",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSResultSetCallDepth",
                "com.xiashitech.agent.utils.SessionUtil");
    }
}
